package org.qiuqiu.service.impl;

import java.util.List;


import org.qiuqiu.dao.UserMapper;
import org.qiuqiu.service.UserService;
import org.qiuqiu.vo.PaginationVO;
import org.qiuqiu.vo.User;
import org.qiuqiu.vo.UserExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/***
 * 
 * @author wangsongmao
 *2015年2月5日
 * 下午3:59:52
 */
@Service
public class UserServiceImpl implements UserService{
	@Autowired
 private UserMapper userMapper;
	public int countByExample(UserExample example) {
	
		return userMapper.countByExample(example);
	}

	public int deleteByExample(UserExample example) {
	
		return 0;
	}

	public int deleteByPrimaryKey(Integer userid) {
		
		return 0;
	}

	public int insert(User record) {
		
		return userMapper.insert(record);
	}

	public int insertSelective(User record) {
		
		return 0;
	}

	public List<User> selectByExample(UserExample example) {
	
		return userMapper.selectByExample(example);
	}

	public User selectByPrimaryKey(Integer userid) {
		
		return userMapper.selectByPrimaryKey(userid);
	}

	public int updateByExampleSelective(User record, UserExample example) {
		
		return 0;
	}

	public int updateByExample(User record, UserExample example) {
		
		return 0;
	}

	public int updateByPrimaryKeySelective(User record) {
		
		return 0;
	}

	public int updateByPrimaryKey(User record) {
		
		return userMapper.updateByPrimaryKey(record);
	}

	public User findBynameAndPassword(User user) {
		
		return userMapper.findBynameAndPassword(user);
	}

	public Integer findByName(User user) {
		
		return userMapper.findByName(user);
	}

	

	public Integer findByNickName(User user) {
		
		return userMapper.findByNickName(user);
	}

	public List<User> selectPageByAll(PaginationVO page, User user) {
		
		return userMapper.selectPageByAll(page, user);
	}

	/*public User findrole(User user) {
		// TODO Auto-generated method stub
		return userMapper.findrole(user);
	}*/
 
}
